﻿<?php
session_start();
require_once "config.php";

if (isset($_SESSION['uid']))
	$uid=$_SESSION['uid'];
else
	$uid=0;
if (isset($_POST['viec'])) {
	$viecid=$_POST['viec'];
	$sql="update viec set trang=0 and ngayxong=NOW() where id=$viecid and user=$uid;";
	$result=mysql_query($sql);
	echo $viecid;
} else {
	echo "FAIL";
}
?>

